# define _CRT_SECURE_NO_WARNINGS 1

#include<stdio.h>
#include<string.h>

void xuanzhuan(char* p,int n)
{
	char q = *p;
	for (int i = 0; i < n - 1; i++)
	{
		*p = *(p + 1);
		p++;
	}
	*p = q;
}
int panduan(char arr1[], char arr2[],int len)
{
	for (int i = 0; i < len; i++)
	{
		xuanzhuan(arr2, len);
		if (strcmp(arr1, arr2) == 0)
			return 1;
	}
	return 0;
}

int main()
{
	char arr1[20] = { 0 };
	char arr2[20] = { 0 };
	scanf("%s", arr1);
	scanf("%s", arr2);
	int len = strlen(arr1);
	int ret=panduan(arr1, arr2,len);
	if (ret == 1)printf("arr2 is created by rotation of arr1\n");
	else printf("arr2 is not created by rotation of arr1\n");
}

